<template>
  <div>
    
  </div>
</template>

<script>
export default {
  data(){
    return {
      user: {
        "uid": "000001000002",
        "Name": "张三",
        "Gender":"男",
        "Age": 21,
        "Email":"123456@qq.com",
        "Password": "123456",
        "Address": "山东省济宁市金乡县",
        "CreateDate": "2024-12-16 9:29"
      }
    }
  },
  mounted(){
    // this.doGetRequest();
    this.doPostRequest();
    // this.doFormRequest2();
  },
  methods: {
    async doGetRequest(){
      let res = await this.$http.get('/api/User/GetUsers',{params: { Age: 18,Gender: '男'}});
      console.log(res);

    },
    async doPostRequest(){
      let res = await this.$http.post('/api/User/AddUser',this.user);
      console.log(res)
    },
    async doFormRequest(){
      let formData = new FormData();
      formData.append('name','张三');
      formData.append('age',19);
      formData.append('dataUser',JSON.stringify(this.user));
      let res = await this.$http.post('/api/User/MutliInfo',formData);
    },
    async doFormRequest2(){
      let formData = new FormData();
      formData.append('name','张三');
      formData.append('age',19);
      let res = await this.$http.post('/api/User/MultiInfo2',formData);
    }
  }
}
</script>

<style lang="scss" scoped>

</style>